package Commands;

import Telas.TelaPadrao;

public abstract class CommandFactory {
	TelaPadrao tela;
	
	public CommandFactory(TelaPadrao tela) {
		this.tela = tela;
	}
	
	public CommandFactory() {
	}

	public ActionListenerBotao getCommandNovo(){
		Command novo = criarCommandNovo(tela);
		return new ActionListenerBotao(novo);
	}
	
	public ActionListenerBotao getCommandCancelar(){
		Command cancelar = criarCommandCancelar(tela);
		return new ActionListenerBotao(cancelar);
	}
	
	public ActionListenerBotao getCommandExcluir(){
		Command excluir = criarCommandExcluir(tela);
		return new ActionListenerBotao(excluir);
	}
	
	public ActionListenerBotao getCommandEditar(){
		Command editar = criarCommandEditar(tela);
		return new ActionListenerBotao(editar);
	}
	
	public ActionListenerBotao getCommandGravar(){
		Command gravar = criarCommandGravar(tela);
		return new ActionListenerBotao(gravar);
	}
	
	public ActionListenerBotao getCommandPesquisar(){
		Command pesquisar = criarCommandPesquisar(tela);
		return new ActionListenerBotao(pesquisar);
	}
	
	public ActionListenerBotao getCommandPesquisaPesquisar(){
		Command command = criarCommandPesquisaPesquisar(tela);
		return new ActionListenerBotao(command);
	}
	
	public ActionListenerBotao getCommandPesquisaCancelar(){
		Command command = criarCommandPesquisaCancelar(tela);
		return new ActionListenerBotao(command);
	}
	
	public ActionListenerBotao getCommandPesquisaEscolher(){
		Command command = criarCommandPesquisaEscolher(tela);
		return new ActionListenerBotao(command);
	}
	
	public TelaPadrao getTela() {
		return tela;
	}
	
	public abstract Command criarCommandNovo(TelaPadrao tela);
	public abstract Command criarCommandCancelar(TelaPadrao tela);
	public abstract Command criarCommandExcluir(TelaPadrao tela);
	public abstract Command criarCommandEditar(TelaPadrao tela);
	public abstract Command criarCommandGravar(TelaPadrao tela);
	public abstract Command criarCommandPesquisar(TelaPadrao tela);
	public abstract Command criarCommandPesquisaEscolher(TelaPadrao tela);
	public abstract Command criarCommandPesquisaCancelar(TelaPadrao tela);
	public abstract Command criarCommandPesquisaPesquisar(TelaPadrao tela);
}
